package com.zhao.simpleFactory.creater;

import com.zhao.simpleFactory.pojo.Animal;
import com.zhao.simpleFactory.factory.AnimalFactory;
import lombok.extern.slf4j.Slf4j;

//上帝创造猫和狗
@Slf4j
public class God {
    public void create() {
        Animal cat = AnimalFactory.createAnimal("cat");
        Animal dog = AnimalFactory.createAnimal("dog");

        cat.sleep();
        dog.eat("米饭");
    }
}
